-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix order for JoinSwapShareAmountOut CLI args #3942
Conversation
proto/osmosis/gamm/v1beta1/tx.proto
Outdated
string token_in_max_amount = 4 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.moretags) = "yaml:\"share_out_amount\"", | ||
(gogoproto.moretags) = "yaml:\"token_in_max_amount\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
string token_in_max_amount = 5 [ | ||
string share_out_amount = 5 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.moretags) = "yaml:\"token_in_max_amount\"", | ||
(gogoproto.moretags) = "yaml:\"share_out_amount\"", | ||
(gogoproto.nullable) = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we can't edit the proto tx, should be editing the CLI code only.
The relevant code that should be edited is here: https://github.com/osmosis-labs/osmosis/blob/main/x/gamm/client/cli/tx.go#L137-L144 Osmocli doesn't have tooling right for now letting you change the arg order. Either we add that, or we make a custom parse fn (likely much easier) for this CLI tx. ( |
I think simply fixing the help text would be good enough. Also, I suspect other CLI commands related to x/gamm may have the same issue, so better give them a test as well. |
@ValarDragon thoughts on just changing the order of args on the usage text / README? |
Ah yeah, just changing the help text SGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TYSM! Really appreciate the issue close :)
If you get a chance, would you be down to add a changelog entry to breaking changes in the ## v13.1.2
section for
* [3647](https://github.com/osmosis-labs/osmosis/pull/3647), [3942](https://github.com/osmosis-labs/osmosis/pull/3942) (CLI) re-order the command line arguments for `osmosisd tx gamm join-swap-share-amount-out`
Added! |
Thank you! |
* fix order for JoinSwapShareAmountOut args * Revert "fix order for JoinSwapShareAmountOut args" This reverts commit 7991c1c. * change help text * add line to changelog (cherry picked from commit 3e26ec2) Co-authored-by: Richard Liu <[email protected]>
* Fix order for JoinSwapShareAmountOut CLI args (#3942) * fix order for JoinSwapShareAmountOut args * Revert "fix order for JoinSwapShareAmountOut args" This reverts commit 7991c1c. * change help text * add line to changelog (cherry picked from commit 3e26ec2) # Conflicts: # CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Richard Liu <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: Dev Ojha <[email protected]>
Closes: #3813
What is the purpose of the change
Swaps the
token_in_max_amount
andshare_out_amount
CLI arguments of JoinSwapShareAmountOut to match spec in docs.Brief Changelog
token_in_max_amount
andshare_out_amount
in protoTesting and Verifying
Based off the example that @larry0x provided in the issue, I rebuilt osmosisd locally and ran the following to verify:
As seen above, the
token_in_max_amount
being12345
(the 2nd argument) andshare_out_amount
being67890
(the 3rd argument) indicate that the order of the arguments is now fixed.Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no